package com.lq.educationsystem.common.vo;

import lombok.Data;

import java.util.Objects;

@Data
public class CoursePageVo {

    /**
     * 课程id
     */
    private Integer courseId;

    /**
     * 课程名字
     */
    private String courseName;

    /**
     * 页面大小
     */
    private Integer pageSize;

    /**
     * 当前页数
     */
    private Integer page;


    @Override
    public String toString() {
        return "CoursePageVo{" +
                "courseId=" + courseId +
                ", courseName='" + courseName + '\'' +
                ", pageSize=" + pageSize +
                ", page=" + page +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CoursePageVo that = (CoursePageVo) o;
        return Objects.equals(courseId, that.courseId) && Objects.equals(courseName, that.courseName) && Objects.equals(pageSize, that.pageSize) && Objects.equals(page, that.page);
    }

    @Override
    public int hashCode() {
        return Objects.hash(courseId, courseName, pageSize, page);
    }
}
